<script setup lang="ts">
import { onMounted, onBeforeUnmount } from "vue";
import $bus from "../../bus";

onMounted(() => {
  $bus.on("fll", () => {
    console.log("感谢老铁送的法拉力");
  });
});

onBeforeUnmount(() => {
  $bus.off("fll");
});
</script>
<template>
  <div class="child1">
    <h3>我是子组件1：曹植</h3>
  </div>
</template>

<style scoped>
.child1 {
  width: 400px;
  height: 290px;
  background: skyblue;
  padding: 0.5rem;
}
</style>
